<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="http://www.petercorke.com/RVC/common/toolboxhelp.css">
    <title>M-File Help: igraphseg</title>
  </head>
  <body>
  <table border="0" cellspacing="0" width="100%">
    <tr class="subheader">
      <td class="headertitle">M-File Help: igraphseg</td>
      <td class="subheader-left"><a href="matlab:open igraphseg">View code for igraphseg</a></td>
    </tr>
  </table>
<h1>igraphseg</h1><p><span class="helptopic">Graph-based segmentation</span></p><strong>L</strong> = <span style="color:red>igraphseg</span>(<strong>im</strong>, <strong>k</strong>, <strong>min</strong>) is a graph-based segmentation of the greyscale
or color image <strong>im</strong>.  <strong>L</strong> is an image of the same size as <strong>im</strong> where each
element is the label assigned to the corresponding pixel in <strong>im</strong>.  <strong>k</strong> is
the scale parameter, and a larger value indicates a preference for
larger regions, <strong>min</strong> is the minimum region size (pixels).

<strong>L</strong> = <span style="color:red>igraphseg</span>(<strong>im</strong>, <strong>k</strong>, <strong>min</strong>, <strong>sigma</strong>) as above and <strong>sigma</strong> is the width of
a Gaussian which is used to initially smooth the image (default 0.5).

[<strong>L</strong>,<strong>m</strong>] = <span style="color:red>igraphseg</span>(<strong>im</strong>, <strong>k</strong>, <strong>min</strong>, <strong>sigma</strong>) as above but <strong>m</strong> is the number of regions
found.

<h2>Example</h2>
<pre style="width: 90%%;" class="examples">
im&nbsp;=&nbsp;iread('58060.jpg');
[l,m]&nbsp;=&nbsp;igraphseg(im,&nbsp;1500,&nbsp;100,&nbsp;0.5);
idisp(im)
</pre>
<h2>Reference</h2>
"Efficient graph-based image segmentation",
P. Felzenszwalb and D. Huttenlocher,
Int. Journal on Computer Vision,
vol. 59, pp. 167–181, Sept. 2004.

<h2>Notes</h2>
<ul>
  <li>Is a MEX file</li>
</ul>
<h2>Author</h2>
Pedro Felzenszwalb, 2006.

<h2>See also</h2>
<p>
<a href="matlab:doc ithresh">ithresh</a>, <a href="matlab:doc imser">imser</a></p>
<hr>

<table border="0" width="100%" cellpadding="0" cellspacing="0">
  <tr class="subheader" valign="top"><td>&nbsp;</td></tr></table>
<p class="copy">&copy; 1990-2011 Peter Corke.</p>
</body></html>